package edu.etime.xsj.goods.consumer.controllers;

import com.netflix.discovery.converters.Auto;
import edu.etime.xsj.goods.consumer.common.Message;
import edu.etime.xsj.goods.consumer.pojo.GoodsTypeList;
import edu.etime.xsj.goods.consumer.services.GoodsTypeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

@Controller
@RequestMapping("/feign/goodstype")
public class FeignController {
    @Autowired
    private GoodsTypeService goodsTypeService;

    @RequestMapping("/list")
    @ResponseBody
    public Message selectGoodsTypeListByBalance1(Integer id) {
        GoodsTypeList goodsTypeList = goodsTypeService.selectGoodsTypeList();
        Message<GoodsTypeList> message = new Message<>();
        message.setCode(0);
        message.setData(goodsTypeList);
        return message;
    }
}
